package com.ygqh.baby.model;

import com.ygqh.baby.ao.PromotionType;

import java.math.BigDecimal;

/**
 * 〈订单明细退货信息〉
 *
 * @author guohao
 * @date 2018/12/14 10:39
 * @since 1.0.0
 */
public class OrderDetailWithReturnInfo {
    /**
     * 订单编码
     */
    private Long orderId;

    /**
     * 订单明细id
     */
    private Long detailId;

    /**
     * 订单明细skuId
     */
    private Long skuId;

    private PromotionType promotionType;

    /**
     * 是否为特例品
     */
    private Boolean special = false;

    private BigDecimal salePrice;

    private BigDecimal packPrice;
    /**
     * 该新客价为 参与自选包商品同时参与新客
     */
    private BigDecimal newCustomPrice = BigDecimal.ZERO;

    /**
     * 自选包满足数量
     * <p>
     * 例 199 - 2件 productAmount=2；
     */
    private Long productAmount;

    /**
     * 自选包是否可用券
     */
    private Boolean packUseCoupon;

    /**
     * 参与自选包的数量
     */
    private Long packQuantity;

    /**
     * 购买数量
     */
    private Long buyCount;

    /**
     * 已退数量
     */
    private Long returnedCount = 0L;

    /**
     * 此次退货数量
     */
    private Long thisReturnCount = 0L;


    /**
     * 剩余可退数量
     * <p>
     * 购买数量 - 已退数量
     *
     * @return Long
     */
    public Long getLastCount() {

        return buyCount - returnedCount;
    }

    public BigDecimal getNewCustomPrice() {
        return newCustomPrice;
    }

    public void setNewCustomPrice(BigDecimal newCustomPrice) {
        this.newCustomPrice = newCustomPrice;
    }

    public PromotionType getPromotionType() {
        return promotionType;
    }

    public void setPromotionType(PromotionType promotionType) {
        this.promotionType = promotionType;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public BigDecimal getPackPrice() {
        return packPrice;
    }

    public void setPackPrice(BigDecimal packPrice) {
        this.packPrice = packPrice;
    }

    public Long getProductAmount() {
        return productAmount;
    }

    public void setProductAmount(Long productAmount) {
        this.productAmount = productAmount;
    }

    public Long getPackQuantity() {
        return packQuantity;
    }

    public void setPackQuantity(Long packQuantity) {
        this.packQuantity = packQuantity;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getDetailId() {
        return detailId;
    }

    public void setDetailId(Long detailId) {
        this.detailId = detailId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(Long buyCount) {
        this.buyCount = buyCount;
    }

    public Long getReturnedCount() {
        return returnedCount;
    }

    public void setReturnedCount(Long returnedCount) {
        this.returnedCount = returnedCount;
    }

    public Long getThisReturnCount() {
        return thisReturnCount;
    }

    public void setThisReturnCount(Long thisReturnCount) {
        this.thisReturnCount = thisReturnCount;
    }

    public Boolean getSpecial() {
        return special;
    }

    public void setSpecial(Boolean special) {
        this.special = special;
    }

    public Boolean getPackUseCoupon() {
        return packUseCoupon;
    }

    public void setPackUseCoupon(Boolean packUseCoupon) {
        this.packUseCoupon = packUseCoupon;
    }
}
